// 用户相关的操作
import type { User, CodeType } from '@/types/user'
import { request } from '@/utils/request'

// 密码登录
export const loginByPassword = (mobile: string, password: string) =>
  request<User>('/login/password', 'POST', { mobile, password })

// 发送验证码
export const sendMobileCode = (mobile: string, type: CodeType) =>
  request<{ code: string }>('/code', 'GET', { mobile, type })

import type { PatientList, Patient } from '@/types/user'
// 获患者信息列表
export const getPatientList = () => request<PatientList>('/patient/mylist')

export const getPatientDetail = (id: string) => request<Patient>(`/patient/info/${id}`)
